package com.freedom.admin.infrastructure.persistence.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.freedom.admin.infrastructure.persistence.pojo.bo.RoleBO;
import com.freedom.admin.infrastructure.persistence.pojo.bo.RolePageBO;
import com.freedom.admin.infrastructure.persistence.pojo.po.SysRolePO;
import com.freedom.admin.infrastructure.persistence.pojo.query.RolePageQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysRoleMapper extends BaseMapper<SysRolePO> {


    Page<RolePageBO> selectRolePages(Page<RolePageBO> page, @Param("userRoot") boolean userRoot, @Param("queryParams") RolePageQuery queryParams);

    List<RoleBO> queryRoleList();

    boolean updateRoleStatus(@Param("id") Integer id, @Param("status") Integer status);
}
